﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.DataGrid.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <VisualBrush
        x:Key="StripesBrush"
        TileMode="Tile"
        Viewport="0,0,5,20"
        Viewbox="0,0,10,10"
        ViewboxUnits="Absolute"
        ViewportUnits="Absolute">
        <VisualBrush.Visual>
            <Line 
                X1="0"
                X2="10000"
                Y1="0"
                Y2="0"
                Stroke="Orange"/>
        </VisualBrush.Visual>
    </VisualBrush>
    
    <Style
        x:Key="GridStyle"
        TargetType="{x:Type DataGrid}"
        BasedOn="{StaticResource MetroDataGrid}">
        <Setter
            Property="VerticalAlignment"
            Value="Top"/>
        <Setter
            Property="Background"
            Value="DarkOrange"/>
        <Setter
            Property="GridLinesVisibility"
            Value="Horizontal"/>
        <Setter
            Property="HeadersVisibility"
            Value="Column"/>
        <Setter
            Property="BorderBrush"
            Value="Gray"/>
        <Setter
            Property="RowBackground"
            Value="Transparent"/>
        <Setter
            Property="HorizontalGridLinesBrush"
            Value="Transparent"/>
        <Setter
            Property="AlternatingRowBackground"
            Value="Orange"/>        
        <Style.Resources>
            <Style x:Key="ColumnHeaderGripperStyle"
                   TargetType="{x:Type Thumb}">
                <Setter
                    Property="Width"
                    Value="8"/>
                <Setter
                    Property="Background"
                    Value="Transparent"/>
                <Setter 
                    Property="Cursor"
                    Value="SizeWE"/>
                <Setter
                    Property="Template">
                    <Setter.Value>
                        <ControlTemplate 
                            TargetType="{x:Type Thumb}">
                            <Border 
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"/>
                    </ControlTemplate>
                    </Setter.Value>
                </Setter>  
            </Style>
        </Style.Resources>
    </Style>
    
    <Style 
        TargetType="DataGridCell"
        BasedOn="{StaticResource MetroDataGridCell}">  
        <Setter
            Property="MinHeight"
            Value="28"/>
        <Setter
            Property="Foreground"
            Value="White"/>
        <Setter
            Property="BorderThickness"
            Value="0"/>
        <Setter
            Property="Margin"
            Value="0,5,0,0"/>
        <Setter
            Property="Padding"
            Value="5,1"/>
        <Setter
            Property="HorizontalAlignment"
            Value="Center"/>
        <Setter
            Property="VerticalAlignment"
            Value="Center"/>
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate 
                    TargetType="{x:Type DataGridCell}">
                    <Border 
                        Background="{TemplateBinding Background}"  
                        BorderBrush="{TemplateBinding BorderBrush}"  
                        BorderThickness="{TemplateBinding BorderThickness}" 
                        Padding="{TemplateBinding Padding}"
                        SnapsToDevicePixels="True">
                        <ContentPresenter
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style
        TargetType="{x:Type Hyperlink}">
        <Setter
            Property="Foreground"
            Value="White"/>
    </Style>
    
    <Style 
        TargetType="{x:Type DataGridRow}"
        BasedOn="{StaticResource MetroDataGridRow}">
        <Setter 
            Property="Background"
            Value="Transparent"/>
        <Setter
            Property="SnapsToDevicePixels"
            Value="True"/>

    </Style>
        
    <Style
        x:Key="DataGridColumnStyle"
        TargetType="DataGridColumnHeader"
        BasedOn="{StaticResource MetroDataGridColumnHeader}">
        <Setter
            Property="SnapsToDevicePixels"
            Value="True"/>
        <Setter
            Property="MinWidth"
            Value="120"/>
        <Setter
            Property="MinHeight"
            Value="28"/>
        <Setter
            Property="Background"
            Value="DarkOrange"/>
        <Setter
            Property="Foreground"
            Value="DarkOrange"/>
        <Setter
            Property="BorderThickness"
            Value="0"/>
        <Setter
            Property="FontWeight"
            Value="Bold"/>
        <Setter
            Property="Padding"
            Value="4,3,4,3"/>
        <Setter
            Property="HorizontalContentAlignment"
            Value="Center"/>
        <Setter
            Property="VerticalContentAlignment"
            Value="Center"/>
    </Style>
</ResourceDictionary>